<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1">
    <title>SMValidator bootstrap skin demo</title>
    <link rel="stylesheet" href="css/bootstrap.min.css">
    <script src="../../dist/SMValidator.js"></script>
</head>

<body>
    <div class="container" style="margin:50px">
        <div class="row">
            <form class="form-horizontal" method="POST">
                <div class="form-group">
                    <label class="col-sm-3 control-label">Full Name</label>
                    <div class="col-sm-6">
                        <input type="text" class="form-control" data-rule="required|names">
                    </div>
                </div>
                <div class="form-group">
                    <label class="col-sm-3 control-label">Email</label>
                    <div class="col-sm-6">
                        <input type="text" class="form-control" data-rule="required|email">
                    </div>
                </div>
                <div class="form-group">
                    <label class="col-sm-3 control-label">Password</label>
                    <div class="col-sm-6">
                        <input name="password" type="password" class="form-control" data-rule="required|length(7,11)" placeholder="length between 8 to 10">
                    </div>
                </div>
                <div class="form-group">
                    <label class="col-sm-3 control-label">Verify Password</label>
                    <div class="col-sm-6">
                        <input type="password" class="form-control" data-rule="required|equal([name='password'])">
                    </div>
                </div>
                <div class="form-group">
                    <div class="col-sm-9 col-sm-offset-3">
                        <button type="submit" class="btn btn-primary">Submit</button>
                    </div>
                </div>
            </form>
        </div>
    </div>
    <script>
        SMValidator.setSkin('bootstrap');
        new SMValidator('form', {
            submit: function(valid, form) {
                if(valid) form.submit();
            }
        });
    </script>
</body>
</html>
